import request from '../../../utils/request'

// 查询文章列表
export function listNews (query) {
  return request({
    url: '/system/cms/news/listNews',
    method: 'get',
    params: query
  })
}
// 添加文章操作
export function addNews (params) {
  return request({
    url: '/system/cms/news/addNews',
    method: 'post',
    data: params
  })
}
// 添加文章操作
export function getNewsById (id) {
  return request({
    url: '/system/cms/news/getNewsById?id=' + id,
    method: 'get'
  })
}
export function updateNews (data) {
  return request({
    url: '/system/cms/news/updateNews',
    method: 'post',
    data: data
  })
}
export function delNews (cateId) {
  return request({
    url: '/system/cms/news/deleteNews',
    method: 'delete',
    data: cateId
  })
}
export function loadNewsModel (cateId, newsId) {
  return request({
    url: '/system/cms/news/deleteNews',
    method: 'delete',
    data: cateId
  })
}
